<%@ page contentType="text/html" %>
<%@ page pageEncoding="utf-8" %>

<html>
  <head>
    <title>My JSP 'login.jsp' starting page</title>
  </head>
  
  <body>
    This is my JSP page. <br>
    <form action="" method="post">
    	<input type="text" name="name" value="" size=10>
    	<input type="submit" name="submit" value="提交">
    </form>
    <%
    	String name=request.getParameter("name");
    	if(name==null || name.length()==0){
    		name="";
    	}
    	session.setAttribute("loginName",new String(name));
     %>
     <a href="show.jsp">跳转到show.jsp页面</a>
     <a href="exit.jsp">跳转到exit.jsp页面</a>
  </body>
</html>

